8314491: Linux: jexec launched via PATH fails to find java
authorVladimir Petko <vladimir.petko@canonical.com>
Mon, 27 Jul 2026 09:39:42 +0000 (11:39 +0200)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Mon, 27 Jul 2026 09:39:42 +0000 (11:39 +0200)
commit9ce437059c6e3a4852ac1d6575c6ff496e235fe5
tree7ffe7111f9ba4a19fca0d4244651f38420c89798
parent2609553db2f68af340356d3e438bfc70ff4dbc0e
8314491: Linux: jexec launched via PATH fails to find java

Bug: https://github.com/openjdk/jdk/pull/15343
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029342
Applied-Upstream: dab1c213fd2760686a7bf3fc8838f4a21056a954
Last-Update: 2023-09-11

 jexec uses argv[0] parameter to find its own location.
 argv[0] is populated with the command value causing a failure to locate java
 when jexec is found in the PATH (in this case argv[0] contains just 'jexec')

Gbp-Pq: Name 8314491-jexec.patch
src/java.base/unix/native/launcher/jexec.c
test/jdk/tools/launcher/Jexec.java